package org.slusk.thynwor.neat;

import com.anji.integration.Activator;

public class AnjiNetWrapper implements ActivatableNet {

	private final Activator net;
	
	public AnjiNetWrapper(Activator net) {
		this.net = net;		
	}

	public double[] activate(double[] input) {
		float[] finput = new float[input.length];
		for (int i = 0; i < input.length; i++) finput[i] = (float) input[i];
		float[] output = net.next(finput);
		double[] doutput = new double[output.length];
		for (int i = 0; i < output.length; i++) doutput[i] = (double) output[i];
		return doutput;
	}

	public Activator getNetwork() {
		return net;
	}

}
